<ul class="basictab">
<li class="selected"><a href="/index/administrators">Administrator Accounts</a></li>
</ul>
<div class="basictabdiv">
 <?php
 
    $newAdminURI = "/index/newadministrator";
    $editAdminURIBase = "/index/editadministrator/id/";
    
 	$admins = $this->admins;
 	$adminList = "<table width=\"100%\" class=\"adminList\">";
 	$adminList .= "<tr>";
 		$adminList .= "<th>Name</th>";
 		$adminList .= "<th>Username</th>";
 		$adminList .= "<th>Phone</th>";
 		$adminList .= "<th>Email</th>";
 		$adminList .= "<th></th>";
 	$adminList .= "</tr>";
 	foreach( $admins as $admin )
 	{
 		$adminName = $admin['fname']." ";
 		$mname = $admin['mname'];
 		if("" != trim($mname)) $adminName .= $mname;
 		$adminName .= " ".$admin['lname'];
 		
 		$adminUsername = $admin['username'];
 		$adminPhone = $admin['phone'];
 		$adminEmail = $admin['email'];
 		$adminID = $admin['id'];
 		$adminEditURI = $editAdminURIBase . $adminID;
 		
 		$adminList .= "<tr>";
 		$adminList .= "<td>$adminName</td>";
 		$adminList .= "<td>$adminUsername</td>";
 		$adminList .= "<td>$adminPhone</td>";
 		$adminList .= "<td>$adminEmail</td>";
 		$adminList .= "<td><a href=\"$adminEditURI\">edit</a></td>";
 		$adminList .= "</tr>";
 	}	
 	$adminList .= "</table>";
  ?>
  <a href="<?php echo $newAdminURI?>">Create New Administrator</a>
  <?php echo $adminList?>
  </div>
  